package com.qdxwx.data.mapper.user;


import com.qdxwx.models.user.UserThird;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * UserThird接口
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
@Repository
public interface UserThirdMapper {

	/**
	 * 添加UserThird
	 * 
	 * @param userThird
	 *            要添加的UserThird
	 * @return id
	 */
	int addUserThird(UserThird userThird);

	/**
	 * 根据id删除一个UserThird
	 * 
	 * @param id
	 *            要删除的id
	 */
	void deleteUserThirdById(int id);

	/**
	 * 修改UserThird
	 * 
	 * @param userThird
	 *            要修改的UserThird
	 */
	void updateUserThird(UserThird userThird);

	/**
	 * 根据id获取单个UserThird对象
	 * 
	 * @param userId
	 *            要查询的id
	 * @return UserThird
	 */
	List<UserThird> selectUserThirdByUserId(long userId);
	/**
	 * 根据id获取单个UserThird对象
	 *
	 * @param userId
	 *            要查询的id
	 * @return UserThird
	 */
	UserThird selectWxUserThirdByUserId(long userId);

	/**
	 * 根据条件获取UserThird列表
	 * 
	 * @param userThird
	 *            查询条件
	 * @return List<UserThird>
	 */
	List<UserThird> selectUserThirdList(UserThird userThird);

	/**
	 * 查询该账号是否绑定过相同类型的第三方
	 * @param userThird
	 * @return
	 */
	int countUserThird(UserThird userThird);
	/**
	 * 根据id获取第三方信息
	 * @param id
	 * @return
     */
	UserThird selectUserThirdById(Long id);
	/**
	 * 根据value获取第三方信息
	 * @param value
	 * @return
	 */
	UserThird selectUserThirdByValue(String value);

}